package com.huakai.springenv.aspect;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.*;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class BootBeanFactoryAware implements
        BeanNameAware,
        BeanClassLoaderAware,
        BeanFactoryAware,
        InitializingBean
{

    @Override
    public void setBeanName(String name) {
        log.error("beanName ：{}",name);
    }

    @Override
    public void setBeanClassLoader(ClassLoader classLoader) {
        log.error("classLoader ：{}",classLoader.getClass());
    }

    @Override
    public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
        log.error("beanFactory ：{}",beanFactory.getClass());
    }


    @Override
    public void afterPropertiesSet() throws Exception {
        log.error("afterPropertiesSet");
    }
}
